﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<WebPortal.Models.ViewModel.UserSecurityModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Edit your security info
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="StylesContainer" runat="server">
    <link href="../../Content/Profile.css" rel="stylesheet" type="text/css" />
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="ScriptContainer" runat="server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <div id="sidebar" >
        <h1>Your Profile</h1>
        <ul class="sidemenu">
            <li><%: Html.ActionLink("Contact Info", "Index", "Profile") %></li>
            <li><%: Html.ActionLink("Edit email or password", "Security", "Profile") %></li>
        </ul>
    </div>

    <div id="main">
        <h1>You can change your security info</h1>
        <% Html.BeginForm(); %>
            <fieldset class="Security">
                <label>Email</label>
                <%: Html.TextBoxFor(m => m.Email) %> 
                <% if (ViewData["validate"].Equals(true)) %> 
                    <%: Html.ValidationMessageFor(m => m.Email)%>

                <label>Old password</label>
                <%: Html.TextBoxFor(m => m.OldPassword) %>  
                <% if (ViewData["validate"].Equals(true)) %> 
                    <%: Html.ValidationMessageFor(m => m.OldPassword) %>

                <label>New password</label>
                <%: Html.TextBoxFor(m => m.NewPassword) %>  
                <% if (ViewData["validate"].Equals(true)) %> 
                    <%: Html.ValidationMessageFor(m => m.NewPassword) %>

                <label>Confirm new password</label>
                <%: Html.TextBoxFor(m => m.ConfirmPassword) %>  
                <% if (ViewData["validate"].Equals(true)) %> 
                    <%: Html.ValidationMessageFor(m => m.ConfirmPassword) %>

                <% if (true.Equals(ViewData["invalid"]))
                   { %> 
                    <label class="error">Wrong passwords</label>
                <% } %>

                <input class="Submit" type="submit" value="Save" />
            </fieldset>
        <% Html.EndForm(); %>
    </div>

</asp:Content>